Skip to main content
Version: 11.x

Type alias: QueryLike<TRoot, TProcedure>

QueryLike: <TRoot, TProcedure> object

Use to request a query route which matches a given query procedure's interface

Type parameters

Parameter
TRoot extends AnyRootTypes
TProcedure extends AnyProcedure

Type declaration

useQuery

useQuery: (variables, opts?) => InferQueryResult< TRoot, TProcedure >

Parameters

ParameterType
variablesinferProcedureInput< TProcedure >
opts?InferQueryOptions< TRoot, TProcedure, any >

Returns

InferQueryResult< TRoot, TProcedure >


useSuspenseQuery

useSuspenseQuery: (variables, opts?) => UseTRPCSuspenseQueryResult< inferProcedureOutput< TProcedure >, TRPCClientErrorLike< TRoot > >

Parameters

ParameterType
variablesinferProcedureInput< TProcedure >
opts?InferQueryOptions< TRoot, TProcedure, any >

Returns

UseTRPCSuspenseQueryResult< inferProcedureOutput< TProcedure >, TRPCClientErrorLike< TRoot > >

Source

packages/react-query/src/shared/polymorphism/queryLike.ts:18


Generated using TypeDoc and typedoc-plugin-markdown